package com.uking.helper;

public class VKErrorMessage {
    private static VKErrorMessage errormsg;
    private int errorCode;
    private String errorMsg;

    private VKErrorMessage() {
    }

    public static synchronized VKErrorMessage getInstace() {
        VKErrorMessage kBErrorMessage;
        synchronized (VKErrorMessage.class) {
            if (errormsg == null) {
                errormsg = new VKErrorMessage();
            }
            kBErrorMessage = errormsg;
        }
        return kBErrorMessage;
    }

    public int getErrorCode() {
        return this.errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return this.errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public void setMessage(int errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public void clearMessage() {
        this.errorCode = 0;
        this.errorMsg = "";
    }
}
